import http from '@/utils/request';

// import config from '@/config';


class FileService {

    /**
     * 获取文件分组(tree)
     */
    static tree(params) {
        let url = '/store/file.group/tree';
        return http.get(url, params);
    }

    /**
     * 获取文件分组(list)
     */
    static list(params) {
        let url = '/store/file.group/list';
        return http.get(url, params);
    }

    /**
     * 移动文件分组
     */
    static move(params) {
        let url = '/store/file/move';
        return http.post(url, params);
    }

    /**
     * 批量删除文件
     */
    static destroy(params) {
        let url = '/store/file/destroy';
        return http.post(url, params);
    }

    /**
     * 更新文件信息
     */
    static save(params) {
        let url = '/store/file/save';
        return http.post(url, params);
    }


    /**
     * 添加文件分组
     */
    static add(params) {
        let url = '/store/file.group/add';
        return http.post(url, params);
    }


    /**
     * 获取文件信息
     */
    static filelist(params) {
        let url = '/store/file/list';
        return http.post(url, params);
    }


    /**
     * 上传文件
     */
    static file(params) {
        let url = '/store//upload/file';
        return http.post(url, params);
    }
}

export default FileService;